//
//  AIDoor.h
//  AIDoorSDK
//
//  Created by Cyan on 16/4/12.
//  Copyright © 2016年 yangshangwei. All rights reserved.
//

#import <Foundation/Foundation.h>

//登录操作
typedef void (^AIDoorLoginSuccessBlock)(void);
typedef void (^AIDoorLoginFailureBlock)(int errorCode);

// 打卡操作
//打卡成功
typedef void (^AIDoorClockInSuccessBlock)(void);
// 打卡动作 摇一摇回调
typedef void (^AIDoorClockInActionBlock)(void);
// 打卡失败
typedef void (^AIDoorClockInFailureBlock)(NSString *errorMsg);

@interface AIDoorSDK : NSObject


/**
 *  初始化
 *
 *  @param appId,secret
 */
+ (void)init:(NSString *)appId secret:(NSString *)secret;

/**
 *  登录
 *
 *  @param orgId,mobile
 */
+ (void)login:(NSString *)orgId mobile:(NSString *)mobile success:(AIDoorLoginSuccessBlock) successBlock failure:(AIDoorLoginFailureBlock) failureBlock;

/**
 *  打卡操作
 *
 */
+ (void)sendCardNo:(AIDoorClockInSuccessBlock) successBlock action:(AIDoorClockInActionBlock) actionBlock failure:(AIDoorClockInFailureBlock) failureBlock;

/**
 *   获取当前sdk的版本
 *
 */
+ (NSString *)getSDKVersion;

/**
 *  注销
 *
 */
+ (void) Logout;

@end
